package com.micronaut.cloud.enums;

/***
 * @description: 响应码定义
 * @author: zhuhb
 * @date: 2022/4/12 13:32
 */
public enum ResultCodeEnum {
    SUCCESS(200, "成功"),
    PARAMETER_ERROR(400, "参数错误"),
    TOKEN_EXPIRE(401, "登录过期"),
    ERROR(500, "系统错误");

    private int code;
    private String desc;

    public String desc() {
        return desc;
    }

    public int code() {
        return code;
    }

    private ResultCodeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
}
